//
//  Extention+UILabel.swift
//  weibo
//
//  Created by 丁蒙 on 16/6/27.
//  Copyright © 2016年 丁蒙. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(fontSize: CGFloat,textColor: UIColor,maxWidth: CGFloat = 0) {
        self.init()
        self.font = UIFont.systemFontOfSize(fontSize)
        self.textColor = textColor
        
        if maxWidth > 0 {
            //最大宽度
            self.preferredMaxLayoutWidth = maxWidth
            self.numberOfLines = 0
        }
    }
}